Page({
  //h5传过来的参数

  
  onLoad: function(options) {
    console.log("webview传过来的参数", options);
   
    //字符串转对象
    let payData = decodeURIComponent(options.payDataStr);
    payData =JSON.parse(payData);
    console.log("参数", payData);
    let that = this;
   
    wx.requestPayment({
      timeStamp:payData.timeStamp+"",
      nonceStr: payData.nonceStr+"",
      package: payData.package1+"",
      signType:payData.signType+"",
      paySign: payData.paySign+"",

      success(res) {
        console.log("支付成功", res)

        wx.navigateTo({
         
          url: '../wePay/wePaySuccess',
        
        })
      },
      fail(res) {

        console.log("支付失败", res);
        wx.navigateBack({
          delta: 2,
        })
      }
    })


  }

})